import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: "/home"
  }, {//首页
    path: '/home',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true
    }
  }, { //登录页面
    path: '/login',
    name: 'Login',
    component: () => import('../views/login.vue'),
    meta: {
      showTab: false
    }
  }, { //我的页面
    path: '/mine',
    name: 'mine',
    component: () => import('../views/mine.vue'),
    meta: {
      showTab: true
    }
  }, { //收藏页面
    path: '/collect',
    name: 'collect',
    component: () => import('../views/collect.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router